[XEN] Fix arg clobber test for debug version of hypercall code.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 20 Sep 2006 08:56:50 +0000 (09:56 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 20 Sep 2006 08:56:50 +0000 (09:56 +0100)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/x86_32/entry.S
xen/arch/x86/x86_64/entry.S

index 79f0f08815071711a6e593071a241079fa343f14..06a25fa188bc684dab730f814d1dbedf790f215b 100644 (file)
@@ -198,7 +198,7 @@ ENTRY(hypercall)
         /* Deliberately corrupt parameter regs used by this hypercall. */
         addl  $24,%esp     # Shadow parameters
         popl  %ecx         # Shadow EIP
-        cmpl  %ecx,UREGS_eip(%esp)
+        cmpl  %ecx,UREGS_eip+4(%esp)
         popl  %ecx         # Shadow hypercall index
         jne   skip_clobber # If EIP has changed then don't clobber
         movzb hypercall_args_table(,%ecx,1),%ecx
index d1a6c19599264a662729281f00a3eb6468a32de8..57a3674eda7a650ed943bb5fa8bad9d1a4ea9ad2 100644 (file)
@@ -152,7 +152,7 @@ ENTRY(syscall_enter)
 #ifndef NDEBUG
         /* Deliberately corrupt parameter regs used by this hypercall. */
         popq  %r10         # Shadow RIP
-        cmpq  %r10,UREGS_rip(%rsp)
+        cmpq  %r10,UREGS_rip+8(%rsp)
         popq  %rcx         # Shadow hypercall index
         jne   skip_clobber /* If RIP has changed then don't clobber. */
         leaq  hypercall_args_table(%rip),%r10